<?xml version="1.0" encoding="LATIN1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="_template.xhtml">
	<ui:define name="corpo">

		<div id="conteudo"><br />

			<h:form id="form">

				<h2>
					<h:outputText value="CADASTRAR UNIDADE" />
				</h2>
				<hr /><br />				
				
				<p:fieldset legend="Dados da Unidade">
				
				<h:panelGrid columns="3" cellspacing="10" cellpadding="10">
					
				<h:outputLabel value="Nome  * : " for="nome" />
				<p:inputText id="nome" value="#{unidadeBean.unidade.nome}" required="true" requiredMessage="Preencha o campo *Nome" style="width: 300px">
					<p:ajax event="change" />
				</p:inputText><br /><br />
				
				<h:outputLabel value="Sigla: " for="sigla" />
				<p:inputText id="sigla" value="#{unidadeBean.unidade.sigla}" style="width: 90px">
					<p:ajax event="change" />
				</p:inputText><br /><br />
				
				</h:panelGrid>
				
				<p:commandButton id="grava" value="GRAVAR" action="#{unidadeBean.grava}" update=":form" ajax="false" icon="ui-icon-disk">
					<p:ajax render="@form" />
				</p:commandButton>	
							
				</p:fieldset>
				
				<p:messages/>
				
				<br /><br />
				<p:ajaxStatus style="width:16px;height:16px;" id="ajaxStatusPanel">
					<f:facet name="start">
						<h:graphicImage value="/resources/img/ajaxloading1.gif" />
					</f:facet>

					<f:facet name="complete">
						<h:outputText value="" />
					</f:facet>
				</p:ajaxStatus>	
				
				</h:form>
			
		</div>


	</ui:define>
</ui:composition>
</html>